package com.yanchangapp.adapter;

import android.support.annotation.Nullable;
import android.widget.CheckBox;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanchangapp.R;
import com.yanchangapp.model.bean.SupplierBean;

import java.util.List;

/**
 * Created by apple on 2019-08-09.
 * description:供货商Adapter
 */
public class SupplierAdapter extends BaseQuickAdapter<SupplierBean, BaseViewHolder> {

    public SupplierAdapter(int layoutResId, @Nullable List<SupplierBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, SupplierBean supplierBean) {
        TextView tvText =  baseViewHolder.getView(R.id.tvText);
        tvText.setText(supplierBean.getSupplierName());
        tvText.setSelected(supplierBean.isChecked());
    }
}
